package com.batch.quartz.config;

import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

/**
 * <h3>partitionjob</h3>
 * <p>通用配置</p>
 *
 * @author : hduong
 * @version : 1.0
 * @date : 2019-12-20 11:29
 **/
@Configuration
public class CommonConfig {

    /**
     * 在被容器管理后： 直接自动注入就好了
     */
    protected JobBuilderFactory jobBuilderFactory;

    /**
     * 在被容器管理后： 直接自动注入就好了
     */
    protected StepBuilderFactory stepBuilderFactory;

    @Autowired
    public CommonConfig(JobBuilderFactory jobBuilderFactory, StepBuilderFactory stepBuilderFactory) {
        this.jobBuilderFactory = jobBuilderFactory;
        this.stepBuilderFactory = stepBuilderFactory;
    }
}
